h4 Procedures

.rescol-wrapper.with-borders
  .rescol-header-wrapper
  .rescol-content-wrapper
    table
      thead
        tr
          th name
          th return type
          th arguments
          th language
          th extension
          th
      tbody
        each proc in procs
          tr
            td
              strong= proc.name
            td= proc.return_type
            td
              span.proc-arg-list= proc.arg_list
            td= proc.language
            td= proc.extension
            td
              if proc.language != "c" && proc.language != 'internal'
                a(exec="editProc('" + proc.oid + "', '" + proc.name + "')") Edit
                != "&nbsp;"
                a(exec="procDefinition('" + proc.oid + "', '" + proc.name + "')") Source
                != "&nbsp;"
              a(exec="removeProc('" + proc.oid + "', '" + proc.name + "')") Delete

footer
  - //button.native-look(exec="addColumnForm") Create Procedure
  - //button.native-look(exec="addColumnForm") Create Trigger
  button.native-look(exec="listLanguages") List Languages

h4 Triggers And Constraints

.rescol-wrapper.with-borders
  .rescol-header-wrapper
  .rescol-content-wrapper
    table
      thead
        tr
          th Name
          th Table
          th Procedure
          th Event
          th(title="Deferrable") Deferr.
          th
      tbody
        each trigger in triggers
          tr
            td
              if trigger.constraint_name
                strong(title="Constraint") C
                != "&nbsp;"
                = trigger.constraint_name
              else
                = trigger.name
            td= trigger.table_name
            td= trigger.proc_name
            td= trigger.typeDesc().join(", ")
            td= trigger.tgdeferrable ? "Yes" : "No"
            td
              a(exec="editTrigger('" + trigger.name + "')") Edit
              != "&nbsp;"
              a(exec="removeTrigger('" + trigger.name + "')") Delete

footer
  - //button.native-look(exec="addColumnForm") Create Trigger
